package cn.tedu.bonfire.front.payment.dao.persist.mapper;

import cn.tedu.bonfire.front.payment.pojo.entity.User;
import cn.tedu.bonfire.front.payment.pojo.entity.Withdrawal;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

@Repository
public interface UserMapper extends BaseMapper<User> {
    BigDecimal selectBalance (Long userId);

    Long selectUserId(Long article);

    Integer selectExpirationById(Long userId);

    List<Long> listAllByExpirationGreaterThanZero();



    BigDecimal selectWithdrawal(Long userId);

    int updateWithdrawal(Withdrawal withdrawal);

}
